def query(applynum):
    import requests
    import cookie
    from datetime import datetime
    headers = cookie.headers

    params = {
        'type': 'local',
    }

    data = {
        '_search': 'true',
        'nd': '1747710966739',
        'rows': '10',
        'page': '1',
        'sidx': 'REGISTER_TIME',
        'sord': 'desc',
        'applicant': '',
        'applynum': applynum,
        'itemname': '',
        'acceptUser': '',
        'registerTime': '',
        'registerTime_start': '',
        'registerTime_end': '',
        'submitTime': '',
        'submitTime_start': '',
        'submitTime_end': '',
        'finishTime': '',
        'finishTime_start': '',
        'finishTime_end': '',
        'regName': '',
        'regCode': '',
        'regId': '',
        'orgName': '',
        'orgCode': '',
        'applySubject': '',
        'curState': '',
        'state': '',
        'generalType': '',
    }

    response = requests.post(
        'http://59.215.206.188/qstb/general/monitor/allbusiness/queryAll',
        params=params,

        headers=headers,
        data=data,
    ).json()
    REGISTER_TIME=response['rows'][0]['cell']['REGISTER_TIME']
    BSNUM	=response['rows'][0]['cell']['BSNUM']
    # 将时间戳转换为秒（Python 的 timestamp 是以秒为单位）
    timestamp_seconds = REGISTER_TIME / 1000

    # 转换为日期时间对象
    dt_object = datetime.fromtimestamp(timestamp_seconds)

    # 格式化输出为年月日
    formatted_date = dt_object.strftime('%Y-%m-%d')

    # print("转换后的日期:", formatted_date)
    return [formatted_date, BSNUM]

# query('520323B187536XT425052000002TB')